package com.genericdevice.platform.core.event;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Xilent on 25.05.2014.
 */
public class DefaultEvent implements IEvent {
    private String eventName;
    private Map eventParams;

    public DefaultEvent() {
        this(new HashMap());
    }

    public DefaultEvent(Map eventParams) {
        this.eventParams = eventParams;
    }

    @Override
    public void setName(String name) {
        eventName = name;
    }

    @Override
    public String getName() {
        return eventName;
    }

    @Override
    public Map getEventParams() {
        return eventParams;
    }

    @Override
    public Object getEventParam(String name) {
        return eventParams.get(name);
    }
}
